//list comport


import gnu.io.CommPortIdentifier;  
import java.util.Enumeration;  
  
public class ListCom{  
    public void list() {    
        Enumeration ports = CommPortIdentifier.getPortIdentifiers();    
 	System.out.println("=========================================");  
        while(ports.hasMoreElements())    
        {  
            CommPortIdentifier cpIdentifier = (CommPortIdentifier)ports.nextElement();  
            System.out.println(cpIdentifier.getName());              
        }  
    }    
     
    public static void main(String[] args) {  

        new ListCom().list();    
    }  
}  